const Timestamp = new Date().getTime();
module.exports = {
    publicPath: './',
    // publicPath:process.env.NODE_ENV==='production'?'./',
    // (process.env.NODE_ENV==='test'?"/phoneMonitor":"/phoneMonitor"),
    //outputDir: process.env.outputDir,
    // outputDir:"C:/WebSite/Registrations",
    outputDir:"D:/平台UI/报名",
    assetsDir:'static',
    runtimeCompiler: true,
    devServer: {
      proxy: {
        '/api': {
          target: 'http://virtual.eduhenghong.cn:4466/', //对应自己的接口
          changeOrigin: true,
          ws: true,
          pathRewrite: {
            '^/api': '/api'
          }
        }
      }
    },
    configureWebpack: { // webpack 配置
      output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
        filename: `static/js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
        chunkFilename: `static/js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
      },
    },
    css: {
      loaderOptions: {
        css: {},
        postcss: {
          plugins: [
            require('postcss-px2rem')({
              remUnit: 192
            })
          ]
        }
      }
    },
  }

